using System;
using FluentNHibernate.Automapping;
using FluentNHibernate.Automapping.Alterations;
using MvcMall.Core.Domains;

namespace MvcMall.Data.NHibernateMaps
{
    public class AdminUserMap : IAutoMappingOverride<AdminUser>
    {
        public void Override(AutoMapping<AdminUser> mapping)
        {
            mapping.Map(c => c.UserName).Unique().Equals(true);
            mapping.HasMany(c => c.AdminUserLogs);
            mapping.References(c => c.AdminRole);
        }
    }
}